Node-RED block in Snap4City Microservice library node-red-contrib-snap4city-user is "get-public-kpidata-values">

It allows to retrieve the personal data inserted in My Personal KPI Data.

Inputs

A JSON with these parameters:
id number
the id of the kpi data
startdate string or number
Start date of the data search period in the format yyyy-MM-ddTHH:mmX (where X is the timezone) or timestamp
enddate string or number
Start date of the data search period in the format yyyy-MM-ddTHH:mmX (where X is the timezone) or timestamp
last number
If selected, it only retrieves the last n (where n is the value inserted) data of the inserted period

An example of the JSON array filled with correct data:

{
    "id": 17849,
    "startdate": "2020-04-14T16:30Z",
    "enddate": "2020-04-16T18:30Z",
    "last": 5
}
    

Outputs

Returns an array containing the data that have been saved in the search period

Details

The node can receive a JSON with the parameters described in the Inputs section and with them generate the output JSON. If the values are not present in the input JSON, these are read by those in the configuration. If they are not present in either part, an error is generated for the necessary parameters.